`ifndef NewLabel_TEST_ENV_SV
`define NewLabel_TEST_ENV_SV

`include "NewLabel_test_sysif_agent.sv"
`include "NewLabel_test_memif_agent.sv"
//`include "NewLabel_test_virtual_seq.sv"

class NewLabel_test_env extends ovm_env;

    NewLabel_sysif_agent	sysif_agent;
    NewLabel_memif_agent	memif_agent;
    //NewLabel_virtual_sequencer v_seqr;

    `ovm_component_utils_begin(NewLabel_test_env)
    	//`ovm_field_int(num_bus_masters, OVM_ALL_ON)
    `ovm_component_utils_end
    
    virtual function void build();
        //string inst_name;
        super.build();

        //set_config_int("*.imgsrc_seqr", "count", 0);
        //set_config_string("v_seqr", "default_sequence", "virt_seq_special_16X16");
      //$display("!!!!!!!!!!!!!!!!!!!!!!!");

		sysif_agent = NewLabel_sysif_agent::type_id::create("sysif_agent", this);
		memif_agent = NewLabel_memif_agent::type_id::create("memif_agent", this);
		//v_seqr = NewLabel_virtual_sequencer::type_id::create("v_sequencer", this);

    endfunction

    virtual function void connect();
        super.connect();

		//v_seqr.rf_seqr = rf_agent.rf_seqr;
		//v_seqr.imgsrc_seqr = imgsrc_agent.imgsrc_seqr;
    endfunction

    virtual task run();

    endtask

    function new(string name, ovm_component parent);
        super.new(name, parent);
    endfunction : new

    // Function to assign the virtual intf for all components in this env
    function void assign_vi_sysif(virtual interface SysIf a_if, virtual interface MemIf b_if);
    	sysif_agent.assign_vi(a_if);
    	memif_agent.assign_vi(b_if);
    endfunction

    /*function void assign_vi_memif(virtual interface MemIf e_if);
    	rf_agent.assign_vi(e_if);
    endfunction*/
    
    function void end_of_elaboration();
      /*for(int i = 0; i < num_bus_masters; i++)
      begin
        bus_agent[i].bus_seqr.print();
        bus_agent[i].bus_driver.print();
      end*/
   endfunction : end_of_elaboration
    
endclass

`endif // NewLabel_TEST_ENV_SV
